<template>
    <div class="goods" >
        <!-- 父组件 给子组件 传递值  用属性绑定 属性的值就是要传递的值  然后用props 去接收值-->
            <goods-item v-for="(item,index) in goods" :key='index'  :goodsitems='item'/>
    </div>
</template>
<script>
import GoodsItem from './GoodsItem'

export default {
    name:'GoodsList',
    props:{
        goods:{
            type:Array,
            default(){
                return []
        }
        }
    },
    components:{
       GoodsItem
    },

}
</script>
<style scoped>
      .goods {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;

    padding: 2px;
    margin-bottom: 60px;
  }
</style>